package com.zahb.qadx.util;

import android.app.Activity;
import android.widget.Toast;

import com.zahb.qadx.base.BaseActivity;

/**
 * Created by Zdw on 2020/10/15 14:11
 */
public final class Tips {

    public static void RequestError(Activity activity) {
        if (activity == null || activity.isFinishing()) return;
        String tip = NetWorkUtil.isNetworkConnected(activity) ? "连接服务器异常！" : "请先连接网络！";
        if (activity instanceof BaseActivity) {
            ((BaseActivity) activity).showBindToast(tip);
        } else {
            Toast.makeText(activity, tip, Toast.LENGTH_SHORT).show();
        }
    }
}
